package com.yang.chain_design_pattern.impl;


/**
 * @Description:
 * @Author: 杨 强
 * @CreateTime: 2022-11-01 16:20
 */
public class Test {
    public static void main(String[] args) {
        // 请求来了,创建责任链
        HandlerChain handlerChain = new HandlerChain();

        // 添加我们所有的处理器
        handlerChain.addHandle(new Handle01());
        handlerChain.addHandle(new Handle02());
        handlerChain.addHandle(new Handle03());

        // 责任链执行
        handlerChain.handle("1");
    }
}
